#lang racket

(define (make-vect x y) (cons x y))

(define (xcor-vect v) (car v))

(define (ycor-vect v) (cdr v))

;V1---------------------------------------------------------------------------------------------------------------
;(define (make-frame origin edge1 edge2)
;  (list origin edge1 edge2))
;
;(define (origin-frame frame)
;  (car frame))
;
;(define (edge1-frame frame)
;  (cadr frame))
;
;(define (edge2-frame frame)
;  (car (cdr (cdr frame))))

;V2---------------------------------------------------------------------------------------------------------------
(define (make-frame origin edge1 edge2)
  (cons origin (cons edge1 edge2)))

(define (origin-frame frame)
  (car frame))

(define (edge1-frame frame)
  (car (cdr frame)))

(define (edge2-frame frame)
  (cdr (cdr frame)))

;Testing----------------------------------------------------------------------------------------------------------

(define origin (make-vect 1 2))
(define edge1 (make-vect 3 4))
(define edge2 (make-vect 5 6))
(define frame (make-frame origin edge1 edge2))
(origin-frame frame)
(edge1-frame frame)
(edge2-frame frame)